- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.8k
Introduce pprofile.PutAttribute helper #12798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce pprofile.PutAttribute helper #12798
Conversation
58245f3    to
    f5c3129      
    Compare
  
    | Codecov ReportAttention: Patch coverage is  
 
 ❌ Your patch status has failed because the patch coverage (70.58%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@            Coverage Diff             @@
##             main   #12798      +/-   ##
==========================================
- Coverage   91.61%   91.58%   -0.04%     
==========================================
  Files         505      505              
  Lines       28424    28475      +51     
==========================================
+ Hits        26042    26078      +36     
- Misses       1873     1883      +10     
- Partials      509      514       +5     ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
 | 
| 
 Could you describe that a bit more? (maybe in the changelog?) I find the motivation for this change hard to figure out. | 
| @bogdandrutu @dmitryax Can you please take a look? | 
| @bogdandrutu Are there any further concerns or can you merge this, please? | 
| @bogdandrutu @dmitryax I will merge this by EOW if you do not object before then | 
749f997
    #### Description PR for profiles support in the transform processor. It's a split-out from #39036 and contains only basic functionality, that makes this PR independent from #39681, #39416 and open-telemetry/opentelemetry-collector#12798. For this, several tests were commented out. The reason for this PR is the hope to get it merged so that users and developers can start experimenting with profiles functionality in the transformprocessor. Attributes can't currently can't be used with profiles (due to the above mentioned unmerged PRs). #### Link to tracking issue Fixes #39009 --------- Co-authored-by: Edmo Vamerlatti Costa <[email protected]> Co-authored-by: Tyler Helmuth <[email protected]>
#### Description PR for profiles support in the transform processor. It's a split-out from open-telemetry#39036 and contains only basic functionality, that makes this PR independent from open-telemetry#39681, open-telemetry#39416 and open-telemetry/opentelemetry-collector#12798. For this, several tests were commented out. The reason for this PR is the hope to get it merged so that users and developers can start experimenting with profiles functionality in the transformprocessor. Attributes can't currently can't be used with profiles (due to the above mentioned unmerged PRs). #### Link to tracking issue Fixes open-telemetry#39009 --------- Co-authored-by: Edmo Vamerlatti Costa <[email protected]> Co-authored-by: Tyler Helmuth <[email protected]>
Description
This introduces the
pprofile.PutAttribute()helper method so profile extensions can modify attributes.It replaces the yet unused
pprofile.AddAttribute()function, asAdddoesn't resonate well with thepcommon.MapPut*functions.Additionally, the
PutAttributes()helper takes into account the map k/v nature of attributes, whileAddAttributes()didn't do this.Testing
See also #12390